<template>
	<view class="myCertificate">
		<view class="myCertificate-box" v-if="list.length>0" v-for="(item,index) in list" :key='index' @click="clickDetailes(item)">
			<image src="../../../static/publicwelfare/myzhengshu.png" mode=""></image>
			<view class="middle">
				<text>{{item.text}}</text>
				<text>{{item.time}}</text>
			</view>
			<text class="num">捐赠{{item.num}}积分</text>
		</view>
		<view class="text" v-else>
			没有更多啦
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[{
					time:'2021-11-19  16：45',
					text:'守护者后盾行动',
					num:'3000',
					url:'./mycertificateDetails'
				},{
					time:'2021-11-19  16：45',
					text:'守护者后盾行动',
					num:'3000'
				},{
					time:'2021-11-19  16：45',
					text:'守护者后盾行动',
					num:'3000'
				}]
			}
		},
		methods: {
			clickDetailes(item){
				uni.navigateTo({
					url:item.url
				})
			}
		}
	}
</script>

<style scoped lang="less">
	.text{
		font-size: 32rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #999999;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.myCertificate{
		width: 100%;
		height: 100%;
		padding: 40rpx;
		.myCertificate-box{
			margin-bottom: 40rpx;
			width: 100%;
			height: 142rpx;
			background: #FFFFFF;
			opacity: 1;
			border-radius: 20rpx;
			display: flex;
			padding: 20rpx;
			justify-content: space-between;
			align-items: center;
			image{
				width: 94rpx;
				height: 94rpx;
			}
			.middle{
				display: flex;
				flex-direction: column;
				margin-left:22rpx ;
				margin-right: 40rpx;
				text:first-child{
					font-size: 32rpx;
					font-family: Source Han Sans CN;
					font-weight: 400;
					color: #333333;
				}
				text:last-child{
					font-size: 28rpx;
					font-family: Source Han Sans CN;
					font-weight: 400;
					color: #999999;
				}
			}
			.num{
				font-size: 32rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #FF7200;
			}
		}
	}
</style>
